
<%@page import="java.util.Arrays"%>
<%@page import="java.util.ArrayList"%>
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<%@ page import="java.util.List"%>

<%
	List<String> products = (List<String>) session
			.getAttribute("products");
	List<String> amounts = (List<String>) session
			.getAttribute("amount");
	//List<String> products = Arrays.asList(new String[] { "Item1", "foo" });
%>
<div id="boxContainer">
	<table id="shoppingCartTable">
		<tr>
			<th colspan="2">Cart</th>
		</tr>

		<%
			if (products == null) {
				out.println("<tr><td>Empty</td></tr>");
			} else {
				for (int i = 0; i < products.size(); i++) {
		%>
		<tr>
			<td>
				<%
					out.println(amounts.get(i) + "x ");
				%>
			</td>
			<td>
				<%
					out.println(products.get(i));
				%>
			</td>
		</tr>
		<%
			}
			}
		%>
	</table>

</div>
